package com.gebro.classifier;



/**
 * 
 * 
 * 
 * 
 * @author hadi.elmougy
 *
 */
public class Node implements Comparable<Node> {

	private MatrixElement el;

	public Node(MatrixElement el, double dist) {
		this.el = el;
		this.distance = dist;
	}

	public MatrixElement getEl() {
		return el;
	}

	public void setEl(MatrixElement el) {
		this.el = el;
	}

	public double getDistance() {
		return distance;
	}

	public void setDistance(double distance) {
		this.distance = distance;
	}

	private double distance;

	@Override
	public int compareTo(Node o) {
		if (this.getDistance() > o.getDistance()) {
			return 1;
		}
		if (this.getDistance() == o.getDistance()) {
			return 0;
		} else {
			return -1;
		}
	}

}
